﻿<script id="scriptInit" type="text/javascript">
    $(document).ready(function () {
        $("#tagsinput").wijcombobox(
            {
                showingAnimation: { effect: "blind" },
                hidingAnimation: { effect: "blind" },
                data: [
                    ]
            }
            );
        $("#tags").wijcombobox(
                {
                    showingAnimation: { effect: "blind" },
                    hidingAnimation: { effect: "blind" }
                }
            );
        $('#tags').change(function () {

            $.post('@Url.Action("catalogueChanged", "ConsulterActivites")', { value: $("#tags option:selected").val() });
            $(location).attr("href", '@Request.Url.AbsoluteUri')
        });
        $('#show').click(function () {
            $("#tags").show();
        });
    });

</script>
<select id="tags" style="width: 200px">
    @{
        var v = @Model.getCatalogue();

            foreach (GAE_PI.sp_selectCatalogues_Result d in v)
            {
                <option @if (Model.getSelectedDate().ToShortDateString().Equals(d.dateDebut.ToShortDateString()))
                        {
                                    <text>selected </text> 
                        } 
                        value="@d.dateDebut.ToShortDateString()">@d.dateDebut.Day.@d.dateDebut.Month.@d.dateDebut.Year-@d.dateFin.Day.@d.dateFin.Month.@d.dateFin.Year</option>
            }
        }
</select>


